home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Applications 1996 May / SGI IRIX 6.2 Applications 1996 May.iso / dist / impr_dev.idb / usr / share / catman / p_man / cat3 / scgetstatus.z / scgetstatus
Text File  |  1996-05-06  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))                   IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                    SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SCGetStatus, SCGetStatusFD - Get status information about a scanner
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccaaaannnnnnnneeeerrrr....hhhh>>>>
  14.  
  15.      iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, SSSSCCCCSSSSTTTTAAAATTTTUUUUSSSS ****sssstttt))));;;;
  16.  
  17.      iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussssFFFFDDDD((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss))));;;;
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _S_C_G_e_t_S_t_a_t_u_s gets status information from a scanner driver.
  21.  
  22.      _s specifies a connection to a scanner driver obtained from a call to
  23.      _S_C_O_p_e_n(3), _S_C_O_p_e_n_F_i_l_e(3), or _S_C_O_p_e_n_S_c_r_e_e_n(3).
  24.  
  25.      SSSSCCCCSSSSTTTTAAAATTTTUUUUSSSS is defined in <_s_c_a_n_n_e_r._h> as follows:
  26.  
  27.           enum scstate { SC_READY, SC_SCANNING, SC_ERROR };
  28.  
  29.           typdef struct tag_scstatus {
  30.               enum scstate state;
  31.               int errno;
  32.               long curline;
  33.               int pass;
  34.           } SCSTATUS;
  35.  
  36.  
  37.      _s_t_a_t_e is SSSSCCCC____RRRREEEEAAAADDDDYYYY if the scanner is idle, waiting for commands.  If a
  38.      scan is in progress, _s_t_a_t_e is SSSSCCCC____SSSSCCCCAAAANNNNNNNNIIIINNNNGGGG, and if an error has occurred
  39.      _s_t_a_t_e is SSSSCCCC____EEEERRRRRRRROOOORRRR and _e_r_r_n_o will be set to indicate the cause of the
  40.      error condition.  _e_r_r_n_o takes on the same values that the global variable
  41.      _S_C_e_r_r_n_o does.
  42.  
  43.      If _s_t_a_t_e is SSSSCCCC____SSSSCCCCAAAANNNNNNNNIIIINNNNGGGG, _c_u_r_l_i_n_e indicates the number of the last scan
  44.      line which was fully processed by the scanner driver, and _p_a_s_s indicates
  45.      which pass is currently being processed.  During the first scanning pass
  46.      of a multiple pass scan, _p_a_s_s will be 0, during the second _p_a_s_s will be
  47.      1, etc.
  48.  
  49.      _S_C_G_e_t_S_t_a_t_u_s_F_D returns a file descriptor which can be passed to the
  50.      _s_e_l_e_c_t(2) system call.  When _s_e_l_e_c_t(2) indicates that the file descriptor
  51.      is ready for reading, the scanner driver has updated the scanning status.
  52.      Retrieve the status by calling _S_C_G_e_t_S_t_a_t_u_s; do NOT pass the file
  53.      descriptor returned from _S_C_G_e_t_S_t_a_t_u_s_F_D to any other system call.
  54.  
  55.      _S_C_G_e_t_S_t_a_t_u_s_F_D provides a mechanism whereby it is not necessary for an
  56.      application to periodically call _S_C_G_e_t_S_t_a_t_u_s in a timer loop to detect
  57.      changes in scanner status.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))                   IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                    SSSSCCCCGGGGeeeettttSSSSttttaaaattttuuuussss((((3333))))
  71.  
  72.  
  73.  
  74. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  75.      _S_C_G_e_t_S_t_a_t_u_s returns 0 if successful, or -1 if an error occurs.
  76.  
  77.      _S_C_G_e_t_S_t_a_t_u_s_F_D returns a file descriptor if successful, or -1 if an error
  78.      occurs.
  79.  
  80.      If either function returns -1, The global variable _S_C_e_r_r_n_o will be set to
  81.      indicate the reason for the error.
  82.  
  83. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  84.      _S_C_G_e_t_S_t_a_t_u_s and _S_C_G_e_t_S_t_a_t_u_s_F_D will fail under the following
  85.      circumstances.
  86.  
  87.      SCECOMM                  Error communicating with scanner driver
  88.  
  89.      SCEDRVMSG                Driver specific error.  _S_C_E_r_r_o_r_S_t_r_i_n_g(3) will
  90.                               return a custom message supplied by the scanner
  91.                               driver
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      _l_i_b_s_c_a_n(3), _S_C_O_p_e_n(3), _S_C_S_c_a_n(3), _S_C_S_c_a_n_F_D(3).
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.